% Hash function
-module(hash).
-export([hash/1]).

hash(Data) ->
    case is_atom(Data) of
        true  -> crypto:sha(atom_to_list(Data));
        false -> crypto:sha(Data)
    end.
